package Test03;

import java.util.Scanner;

//小明参加期末Java考试，通过考试成绩，判断其Java等级，成绩范围[0,100]
public class Demo02 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入一个成绩: ");
        int score = input.nextInt();
        if(score >= 1&&score <= 100) {
            if(score>=90){
                System.out.println("等级为A ");
            }else if(score>=85&&score<90) {
                System.out.println("等级为B ");
            } else if(score>=60&&score<88) {
                System.out.println("等级为C ");
            }else{
                System.out.println("等级为D ");
            }
        }else{
            System.out.println("输入成绩不符合要求");
        }
    }
}
